Optimal. Leaf size=261 \[ \frac {(a+b x)^{m+1} (c+d x)^{-m} \left (-c d (a f h m+2 b (e h+f g))+d f h m x (b c-a d)+b c^2 f h (m+2)+2 b d^2 e g\right )}{2 b d^2 m (b c-a d)}-\frac {(a+b x)^{m+1} (c+d x)^{-m} \left (\frac {b (c+d x)}{b c-a d}\right )^m \, _2F_1\left (m,m+1;m+2;-\frac {d (a+b x)}{b c-a d}\right ) \left (d^2 \left (a^2 (-f) h (1-m) m+2 a b m (e h+f g)+2 b^2 e g\right )-2 b c d (m+1) (a f h m+b e h+b f g)+b^2 c^2 f h (m+1) (m+2)\right )}{2 b^2 d^2 m (m+1) (b c-a d)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.19, antiderivative size = 261, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {146, 70, 69} \[ \frac {(a+b x)^{m+1} (c+d x)^{-m} \left (-c d (a f h m+2 b (e h+f g))+d f h m x (b c-a d)+b c^2 f h (m+2)+2 b d^2 e g\right )}{2 b d^2 m (b c-a d)}-\frac {(a+b x)^{m+1} (c+d x)^{-m} \left (\frac {b (c+d x)}{b c-a d}\right )^m \, _2F_1\left (m,m+1;m+2;-\frac {d (a+b x)}{b c-a d}\right ) \left (d^2 \left (a^2 (-f) h (1-m) m+2 a b m (e h+f g)+2 b^2 e g\right )-2 b c d (m+1) (a f h m+b e h+b f g)+b^2 c^2 f h (m+1) (m+2)\right )}{2 b^2 d^2 m (m+1) (b c-a d)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 69
Rule 70
Rule 146
Rubi steps
\begin {align*} \int (a+b x)^m (c+d x)^{-1-m} (e+f x) (g+h x) \, dx &=\frac {(a+b x)^{1+m} (c+d x)^{-m} \left (2 b d^2 e g+b c^2 f h (2+m)-c d (2 b (f g+e h)+a f h m)+d (b c-a d) f h m x\right )}{2 b d^2 (b c-a d) m}-\frac {\left (b^2 c^2 f h (1+m) (2+m)-2 b c d (1+m) (b f g+b e h+a f h m)+d^2 \left (2 b^2 e g+2 a b (f g+e h) m-a^2 f h (1-m) m\right )\right ) \int (a+b x)^m (c+d x)^{-m} \, dx}{2 b d^2 (b c-a d) m}\\ &=\frac {(a+b x)^{1+m} (c+d x)^{-m} \left (2 b d^2 e g+b c^2 f h (2+m)-c d (2 b (f g+e h)+a f h m)+d (b c-a d) f h m x\right )}{2 b d^2 (b c-a d) m}-\frac {\left (\left (b^2 c^2 f h (1+m) (2+m)-2 b c d (1+m) (b f g+b e h+a f h m)+d^2 \left (2 b^2 e g+2 a b (f g+e h) m-a^2 f h (1-m) m\right )\right ) (c+d x)^{-m} \left (\frac {b (c+d x)}{b c-a d}\right )^m\right ) \int (a+b x)^m \left (\frac {b c}{b c-a d}+\frac {b d x}{b c-a d}\right )^{-m} \, dx}{2 b d^2 (b c-a d) m}\\ &=\frac {(a+b x)^{1+m} (c+d x)^{-m} \left (2 b d^2 e g+b c^2 f h (2+m)-c d (2 b (f g+e h)+a f h m)+d (b c-a d) f h m x\right )}{2 b d^2 (b c-a d) m}-\frac {\left (b^2 c^2 f h (1+m) (2+m)-2 b c d (1+m) (b f g+b e h+a f h m)+d^2 \left (2 b^2 e g+2 a b (f g+e h) m-a^2 f h (1-m) m\right )\right ) (a+b x)^{1+m} (c+d x)^{-m} \left (\frac {b (c+d x)}{b c-a d}\right )^m \, _2F_1\left (m,1+m;2+m;-\frac {d (a+b x)}{b c-a d}\right )}{2 b^2 d^2 (b c-a d) m (1+m)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.21, size = 221, normalized size = 0.85 \[ \frac {(a+b x)^{m+1} (c+d x)^{-m} \left (\frac {\left (\frac {b (c+d x)}{b c-a d}\right )^m \, _2F_1\left (m,m+1;m+2;\frac {d (a+b x)}{a d-b c}\right ) \left (a^2 d^2 f h (m-1) m+2 a b d m (d (e h+f g)-c f h (m+1))+b^2 \left (c^2 f h \left (m^2+3 m+2\right )-2 c d (m+1) (e h+f g)+2 d^2 e g\right )\right )}{m+1}+b \left (a d f h m (c+d x)-b \left (c^2 f h (m+2)+c d (-2 e h-2 f g+f h m x)+2 d^2 e g\right )\right )\right )}{2 b^2 d^2 m (a d-b c)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.91, size = 0, normalized size = 0.00 \[ {\rm integral}\left ({\left (f h x^{2} + e g + {\left (f g + e h\right )} x\right )} {\left (b x + a\right )}^{m} {\left (d x + c\right )}^{-m - 1}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (f x + e\right )} {\left (h x + g\right )} {\left (b x + a\right )}^{m} {\left (d x + c\right )}^{-m - 1}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 0.24, size = 0, normalized size = 0.00 \[ \int \left (f x +e \right ) \left (h x +g \right ) \left (b x +a \right )^{m} \left (d x +c \right )^{-m -1}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (f x + e\right )} {\left (h x + g\right )} {\left (b x + a\right )}^{m} {\left (d x + c\right )}^{-m - 1}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {\left (e+f\,x\right )\,\left (g+h\,x\right )\,{\left (a+b\,x\right )}^m}{{\left (c+d\,x\right )}^{m+1}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________